<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ArNetworking: ptzCameraClientExample.cpp</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ArNetworking
   &#160;<span id="projectnumber">dev20161014</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('ptzCameraClientExample_8cpp-example.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">ptzCameraClientExample.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<p>Example client showing how to control a Pan/Tilt/Zoom camera remotely.To use, serverDemo, arnlServer from ARNL, sonarnlServer from SONARNL, or your own server program that includes an <a class="el" href="classArServerHandlerCamera.html" title="Accepts and processes camera pan/tilt/zoom requests from the client, and provides information about t...">ArServerHandlerCamera</a> object. Then from another host, run ptzCameraClientExample with the -host argument. For example, if the hostname of the robot's onboard computer is "robot", run: ptzCameraClientExample -host robot Or use an IP address, for example, if the address is 10.0.126.32: ptzCameraClientExample -host 10.0.126.32</p>
<p>This program connects to the server, gets a list of cameras if neccesary, and for each camera on the robot, it receives and prints out one information packet, then a continuous stream of data packets, and then sends requests to cycle through each of its pan and tilt limits.</p>
<p>This program does not get any video images from the server. To do so, use a video server (e.g. SAV server or ACTS), and see getVideoExample for an example client.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;Aria.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="ArNetworking_8h.html">ArNetworking.h</a>&quot;</span></div><div class="line"><span class="preprocessor">#include &lt;math.h&gt;</span></div><div class="line"></div><div class="line"></div><div class="line"><span class="keyword">class </span><a name="_a0"></a><a class="code" href="classArNetCameraRequest.html">ArNetCameraRequest</a> : <span class="keyword">public</span> <a name="_a1"></a><a class="code" href="classArNetPacket.html">ArNetPacket</a></div><div class="line">{</div><div class="line">  <a name="_a2"></a><a class="code" href="classArClientBase.html">ArClientBase</a> *myClient;</div><div class="line">  std::string myAbsReqName;</div><div class="line"><span class="keyword">public</span>:</div><div class="line">  <a name="a3"></a><a class="code" href="classArNetCameraRequest.html#af0188ae835b902a585d990b63608bb87">ArNetCameraRequest</a>(<a class="code" href="classArClientBase.html">ArClientBase</a> *<a name="a4"></a><a class="code" href="changeMapOnServer_8cpp.html#afe594bfb305907ae82f259409cc214cb">client</a>, <span class="keyword">const</span> <span class="keywordtype">char</span> *cameraName = <span class="stringliteral">&quot;&quot;</span>) : myClient(client), myAbsReqName(std::string(<span class="stringliteral">&quot;setCameraAbs&quot;</span>)+cameraName)</div><div class="line">  {}</div><div class="line">  <span class="keywordtype">void</span> <a name="a5"></a><a class="code" href="classArNetCameraRequest.html#aa030aeb5201cddf4819b3fe31a98efd7">setCameraName</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *name) {</div><div class="line">    myAbsReqName = std::string(<span class="stringliteral">&quot;setCameraAbs&quot;</span>) + name;</div><div class="line">  }</div><div class="line">  <span class="keywordtype">bool</span> <a name="a6"></a><a class="code" href="classArNetCameraRequest.html#a440ce2d91e43102dab8a340be99e87ab">requestPanTiltZoomAbs</a>(<span class="keywordtype">double</span> pan, <span class="keywordtype">double</span> tilt, <span class="keywordtype">double</span> zoom);</div><div class="line">  <span class="keywordtype">bool</span> <a name="a7"></a><a class="code" href="classArNetCameraRequest.html#a0ce74f31bac004f0414a66a36a4e776b">requestPanTiltAbs</a>(<span class="keywordtype">double</span> pan, <span class="keywordtype">double</span> tilt);</div><div class="line">};</div><div class="line"></div><div class="line"></div><div class="line"><span class="keyword">class </span><a name="_a8"></a><a class="code" href="classArClientHandlerCamera.html">ArClientHandlerCamera</a> {</div><div class="line"><span class="keyword">public</span>:</div><div class="line">  std::string name;</div><div class="line">  std::string type;</div><div class="line">  std::string displayName;</div><div class="line">  std::string displayType;</div><div class="line">  <span class="keywordtype">double</span> minPan, maxPan, minTilt, maxTilt, minZoom, maxZoom;</div><div class="line">  <span class="keywordtype">bool</span> haveZoom;</div><div class="line">  <span class="keywordtype">double</span> pan, tilt, zoom;</div><div class="line"></div><div class="line">  <span class="keywordtype">void</span> handleCameraInfoReply(<a class="code" href="classArNetPacket.html">ArNetPacket</a> *packet);</div><div class="line">  <span class="keywordtype">void</span> handleCameraDataReply(<a class="code" href="classArNetPacket.html">ArNetPacket</a> *packet);</div><div class="line"></div><div class="line">  <a class="code" href="classArClientBase.html">ArClientBase</a> *myClient;</div><div class="line">  <a class="code" href="classArNetCameraRequest.html">ArNetCameraRequest</a> request;</div><div class="line">  <a name="_a9"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArMutex.html">ArMutex</a> myMutex;</div><div class="line"></div><div class="line">  <a name="_a10"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArFunctor1C.html">ArFunctor1C&lt;ArClientHandlerCamera, ArNetPacket*&gt;</a> myCameraInfoReplyFunc;</div><div class="line">  <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArFunctor1C.html">ArFunctor1C&lt;ArClientHandlerCamera, ArNetPacket*&gt;</a> myCameraDataReplyFunc;</div><div class="line"></div><div class="line">  <a class="code" href="classArClientHandlerCamera.html">ArClientHandlerCamera</a>(<a class="code" href="classArClientBase.html">ArClientBase</a> *<a class="code" href="changeMapOnServer_8cpp.html#afe594bfb305907ae82f259409cc214cb">client</a>, <span class="keyword">const</span> <span class="keywordtype">char</span> *cameraName) : </div><div class="line">    name(cameraName), myClient(client), request(client, cameraName) ,</div><div class="line">    myCameraInfoReplyFunc(<span class="keyword">this</span>, &amp;<a name="a11"></a><a class="code" href="classArClientHandlerCamera.html#a2715cf702f761f43cab82581104431be">ArClientHandlerCamera::handleCameraInfoReply</a>),</div><div class="line">    myCameraDataReplyFunc(<span class="keyword">this</span>, &amp;<a name="a12"></a><a class="code" href="classArClientHandlerCamera.html#af2274757258bbbf6ad4ea773acd73751">ArClientHandlerCamera::handleCameraDataReply</a>)</div><div class="line">  {</div><div class="line">    myClient-&gt;<a name="a13"></a><a class="code" href="classArClientBase.html#a57e195371c8ae810b4bbdd1020852aa5">addHandler</a>((std::string(<span class="stringliteral">&quot;getCameraInfo&quot;</span>)+name).c_str(), &amp;myCameraInfoReplyFunc);</div><div class="line">    myClient-&gt;<a class="code" href="classArClientBase.html#a57e195371c8ae810b4bbdd1020852aa5">addHandler</a>((std::string(<span class="stringliteral">&quot;getCameraData&quot;</span>)+name).c_str(), &amp;myCameraDataReplyFunc);</div><div class="line">  }</div><div class="line"></div><div class="line">  <span class="keywordtype">void</span> requestUpdates(<span class="keywordtype">int</span> dataRequestFreq) {</div><div class="line">    myClient-&gt;<a name="a14"></a><a class="code" href="classArClientBase.html#a0a36a40fe2598eb214368ae8c3a26ca1">request</a>((std::string(<span class="stringliteral">&quot;getCameraInfo&quot;</span>)+name).c_str(), -1);</div><div class="line">    myClient-&gt;<a class="code" href="classArClientBase.html#a0a36a40fe2598eb214368ae8c3a26ca1">request</a>((std::string(<span class="stringliteral">&quot;getCameraData&quot;</span>)+name).c_str(), 100);</div><div class="line">  }</div><div class="line"></div><div class="line">  <span class="keywordtype">void</span> lock() { myMutex.<a name="a15"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArMutex.html#a7b6aee74872c19fb8829d96dc3e52f34">lock</a>(); }</div><div class="line">  <span class="keywordtype">void</span> unlock() { myMutex.<a name="a16"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArMutex.html#afb51b5514a9456f23441e479fe58fb46">unlock</a>(); }</div><div class="line">};</div><div class="line"></div><div class="line"></div><div class="line"><span class="keyword">class </span><a name="_a17"></a><a class="code" href="classPtzCameraExample.html">PtzCameraExample</a></div><div class="line">{</div><div class="line">  <a class="code" href="classArClientBase.html">ArClientBase</a> *myClient;</div><div class="line"></div><div class="line">  std::set&lt;ArClientHandlerCamera*&gt; myCameras;</div><div class="line">  <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArMutex.html">ArMutex</a> mutex;</div><div class="line"></div><div class="line">  <a name="_a18"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArFunctor1C.html">ArFunctor1C&lt;PtzCameraExample, ArNetPacket*&gt;</a> myCameraListReplyFunc;</div><div class="line"></div><div class="line">  <span class="keywordtype">void</span> handleCameraListReply(<a class="code" href="classArNetPacket.html">ArNetPacket</a> *packet);</div><div class="line"></div><div class="line"></div><div class="line"><span class="keyword">public</span>:</div><div class="line">  <a class="code" href="classPtzCameraExample.html">PtzCameraExample</a>(<a class="code" href="classArClientBase.html">ArClientBase</a> *<a class="code" href="changeMapOnServer_8cpp.html#afe594bfb305907ae82f259409cc214cb">client</a>) : </div><div class="line">    myClient(client), </div><div class="line">    myCameraListReplyFunc(<span class="keyword">this</span>, &amp;PtzCameraExample::handleCameraListReply)</div><div class="line">  {</div><div class="line">  }</div><div class="line"></div><div class="line">  <span class="keywordtype">bool</span> init();</div><div class="line">  <span class="keywordtype">void</span> <a name="a19"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/group__easy.html#gaaade8cc11da585cbdcec45f6c8fbe4a6">run</a>();</div><div class="line">};</div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"><span class="keywordtype">int</span> <a name="a20"></a><a class="code" href="ptzCameraClientExample_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)</div><div class="line">{</div><div class="line">  <a name="a21"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classAria.html#ad99c16b5d947229d9f8e1c5b2d4cdd73">Aria::init</a>();</div><div class="line">  <a class="code" href="classArClientBase.html">ArClientBase</a> <a class="code" href="changeMapOnServer_8cpp.html#afe594bfb305907ae82f259409cc214cb">client</a>;</div><div class="line"></div><div class="line">  <a name="_a22"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArArgumentParser.html">ArArgumentParser</a> parser(&amp;argc, argv);</div><div class="line">  <a name="_a23"></a><a class="code" href="classArClientSimpleConnector.html">ArClientSimpleConnector</a> clientConnector(&amp;parser);</div><div class="line">  parser.<a name="a24"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArArgumentParser.html#a501694b62a7f8b0c3cadd84aeafe1b35">loadDefaultArguments</a>();</div><div class="line">  <span class="keywordflow">if</span> (!<a name="a25"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classAria.html#a1b090c01d88bb420b8cf8e0384d25ee1">Aria::parseArgs</a>() || !parser.<a name="a26"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArArgumentParser.html#ac3889cbdfa862031c51bf80e06954914">checkHelpAndWarnUnparsed</a>())</div><div class="line">  {    </div><div class="line">    <a name="a27"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classAria.html#a10d71f3d4d0cf7f38c58a1f749f64a42">Aria::logOptions</a>();</div><div class="line">    <span class="keywordflow">return</span> 1;</div><div class="line">  }</div><div class="line"></div><div class="line">  <span class="keywordflow">if</span> (!clientConnector.<a name="a28"></a><a class="code" href="classArClientSimpleConnector.html#af4c6ca707c6c0f039eeb3a2a092a8160">connectClient</a>(&amp;client))</div><div class="line">  {</div><div class="line">    <span class="keywordflow">if</span>(client.<a name="a29"></a><a class="code" href="classArClientBase.html#ac8c0a3fa78872df34204b9a1aca53ddd">wasRejected</a>())</div><div class="line">      <a name="a30"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a name="a31"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a012daf6573594f91242f8dd7c02eb74b">ArLog::Terse</a>, <span class="stringliteral">&quot;Error, server &#39;%s&#39; rejected connection. Exiting.&quot;</span>, client.<a name="a32"></a><a class="code" href="classArClientBase.html#a1c10f8408523e85a6d891d0331fa6259">getHost</a>());</div><div class="line">    <span class="keywordflow">else</span></div><div class="line">      <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a012daf6573594f91242f8dd7c02eb74b">ArLog::Terse</a>, <span class="stringliteral">&quot;Error, could not connect to server &#39;%s&#39;. Exiting.&quot;</span>, client.<a class="code" href="classArClientBase.html#a1c10f8408523e85a6d891d0331fa6259">getHost</a>());</div><div class="line">    <span class="keywordflow">return</span> 2;</div><div class="line">  }</div><div class="line"></div><div class="line">  client.<a name="a33"></a><a class="code" href="classArClientBase.html#a9d362e67fded3e8c36f120663c7f66cd">setRobotName</a>(client.<a class="code" href="classArClientBase.html#a1c10f8408523e85a6d891d0331fa6259">getHost</a>());  <span class="comment">// include server hostname in log messages</span></div><div class="line"></div><div class="line">  client.<a name="a34"></a><a class="code" href="classArClientBase.html#a778c406a8eda15109afda20521acf502">runAsync</a>();</div><div class="line"></div><div class="line">  <a class="code" href="classPtzCameraExample.html">PtzCameraExample</a> example(&amp;client);</div><div class="line">  <span class="keywordflow">if</span>(!example.<a name="a35"></a><a class="code" href="classPtzCameraExample.html#a0fe9f62f695168f6e67eedfdfbfa76f9">init</a>())</div><div class="line">    <span class="keywordflow">return</span> 1;</div><div class="line"></div><div class="line">  example.<a name="a36"></a><a class="code" href="classPtzCameraExample.html#abebd051cf8fc085f1d3d7b505e1a8c67">run</a>();</div><div class="line"></div><div class="line"></div><div class="line">  <a name="a37"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classAria.html#a184602a2b3799d61569ec55dd9508450">Aria::shutdown</a>();</div><div class="line">  <span class="keywordflow">return</span> 0;</div><div class="line">}</div><div class="line"></div><div class="line"></div><div class="line"><span class="keywordtype">bool</span> <a class="code" href="classPtzCameraExample.html#a0fe9f62f695168f6e67eedfdfbfa76f9">PtzCameraExample::init</a>()</div><div class="line">{</div><div class="line">  <span class="comment">// If the server has the &quot;getCameraList&quot; request, then it&#39;s using</span></div><div class="line">  <span class="comment">// ArServerHandlerCameraCollection, and migth have multiple PTZs/cameras each with</span></div><div class="line">  <span class="comment">// its own set of requests. So send a &quot;getCameraList&quot; request, and when its</span></div><div class="line">  <span class="comment">// reply is received, the handler will send &quot;getCameraInfo&quot; requests for each.</span></div><div class="line">  <span class="comment">// If the server does not have &quot;getCameraList&quot;, it only has one PTZ camera, just</span></div><div class="line">  <span class="comment">// send &quot;getCameraInfo&quot;. The handler for that will send various control</span></div><div class="line">  <span class="comment">// commands.</span></div><div class="line">  <span class="comment">// If the server does not have &quot;getCameraInfo&quot;, then it doesn&#39;t provide any</span></div><div class="line">  <span class="comment">// access to PTZ cameras.</span></div><div class="line">  <span class="keywordflow">if</span>(myClient-&gt;dataExists(<span class="stringliteral">&quot;getCameraList&quot;</span>))</div><div class="line">  {</div><div class="line">    <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a name="a38"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, <span class="stringliteral">&quot;Server may have multiple cameras. Requesting list.&quot;</span>);</div><div class="line">    myClient-&gt;addHandler(<span class="stringliteral">&quot;getCameraList&quot;</span>, &amp;myCameraListReplyFunc);</div><div class="line">    myClient-&gt;requestOnce(<span class="stringliteral">&quot;getCameraList&quot;</span>);</div><div class="line">  }</div><div class="line">  <span class="keywordflow">else</span> <span class="keywordflow">if</span>(myClient-&gt;dataExists(<span class="stringliteral">&quot;getCameraInfo&quot;</span>))</div><div class="line">  {</div><div class="line">    <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, <span class="stringliteral">&quot;Server does not support multiple cameras. Requesting info for its camera.&quot;</span>);</div><div class="line">    <a class="code" href="classArClientHandlerCamera.html">ArClientHandlerCamera</a> *camClient = <span class="keyword">new</span> <a class="code" href="classArClientHandlerCamera.html">ArClientHandlerCamera</a>(myClient, <span class="stringliteral">&quot;&quot;</span>);</div><div class="line">    camClient-&gt;<a name="a39"></a><a class="code" href="classArClientHandlerCamera.html#aad4510c0bbae4ba3b0503cc471b9ef3c">requestUpdates</a>(100);</div><div class="line">    mutex.lock();</div><div class="line">    myCameras.insert(camClient);</div><div class="line">    mutex.unlock();</div><div class="line">  }</div><div class="line">  <span class="keywordflow">else</span></div><div class="line">  {</div><div class="line">    <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a012daf6573594f91242f8dd7c02eb74b">ArLog::Terse</a>, <span class="stringliteral">&quot;Error, server does not have any camera control requests. (Was the server run with video features enabled or video forwarding active?)&quot;</span>);</div><div class="line">    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line">  }</div><div class="line">  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line">}</div><div class="line"></div><div class="line"><span class="keywordtype">void</span> PtzCameraExample::handleCameraListReply(<a class="code" href="classArNetPacket.html">ArNetPacket</a> *pkt)</div><div class="line">{</div><div class="line">  <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArTypes.html#aff7daca3c28eeaacc95b1ac07997661c">ArTypes::Byte2</a> numCams = pkt-&gt;<a name="a40"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#ab300d387c442be9ab025e2c089bbd620">bufToByte2</a>();</div><div class="line">  <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, <span class="stringliteral">&quot;%d cameras in list.&quot;</span>, numCams);</div><div class="line">  <span class="keywordtype">char</span> camName[128];</div><div class="line">  <span class="keywordtype">char</span> camType[128];</div><div class="line">  <span class="keywordtype">char</span> displayName[128];</div><div class="line">  <span class="keywordtype">char</span> displayType[128];</div><div class="line">  <span class="keywordtype">char</span> cmdDesc[128];</div><div class="line">  <span class="keywordtype">char</span> cmdName[128];</div><div class="line">  <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArTypes.html#aa9febccb890f2a2d72c3b88d2ab08855">ArTypes::Byte4</a> cmdFreq;</div><div class="line">  <span class="keywordtype">int</span> dataReqFreq = 100;</div><div class="line">  <span class="keywordflow">for</span>(<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArTypes.html#aff7daca3c28eeaacc95b1ac07997661c">ArTypes::Byte2</a> i = 0; i &lt; numCams; ++i)</div><div class="line">  {</div><div class="line">    memset(camName, 0, 128);</div><div class="line">    memset(camType, 0, 128);</div><div class="line">    memset(displayName, 0, 128);</div><div class="line">    memset(displayType, 0, 128);</div><div class="line">    pkt-&gt;<a name="a41"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#a8f1536daa451024715fe82cec495e826">bufToStr</a>(camName, 128); <span class="comment">// name</span></div><div class="line"></div><div class="line">    <a class="code" href="classArClientHandlerCamera.html">ArClientHandlerCamera</a> *cam = <span class="keyword">new</span> <a class="code" href="classArClientHandlerCamera.html">ArClientHandlerCamera</a>(myClient, camName);</div><div class="line"></div><div class="line">    pkt-&gt;<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#a8f1536daa451024715fe82cec495e826">bufToStr</a>(camType, 128); <span class="comment">// type</span></div><div class="line">    cam-&gt;<a name="a42"></a><a class="code" href="classArClientHandlerCamera.html#a45f9de93dfe8e514cbdc16a6d174306b">type</a> = camType;</div><div class="line">    pkt-&gt;<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#a8f1536daa451024715fe82cec495e826">bufToStr</a>(displayName, 128); <span class="comment">// description</span></div><div class="line">    cam-&gt;<a name="a43"></a><a class="code" href="classArClientHandlerCamera.html#a0c4460b401abbdb215cfec3b6bceefc3">displayName</a> = displayName;</div><div class="line">    pkt-&gt;<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#a8f1536daa451024715fe82cec495e826">bufToStr</a>(displayType, 128); <span class="comment">// description</span></div><div class="line">    cam-&gt;<a name="a44"></a><a class="code" href="classArClientHandlerCamera.html#af192caf1b01de26f1183143a499fded5">displayType</a> = displayType;</div><div class="line">    <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArTypes.html#aff7daca3c28eeaacc95b1ac07997661c">ArTypes::Byte2</a> numCmds = pkt-&gt;<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#ab300d387c442be9ab025e2c089bbd620">bufToByte2</a>();</div><div class="line">    <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, <span class="stringliteral">&quot;%d commands for camera \&#39;%s\&#39; (%s) / \&#39;%s\&#39; (%s)&quot;</span>, numCmds, camName, camType, displayName, displayType);</div><div class="line">    <span class="keywordflow">for</span>(<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArTypes.html#aff7daca3c28eeaacc95b1ac07997661c">ArTypes::Byte2</a> c = 0; c &lt; numCmds; ++c)</div><div class="line">    {</div><div class="line">      memset(cmdDesc, 0, 128);</div><div class="line">      memset(cmdName, 0, 128);</div><div class="line">      <span class="keywordtype">char</span> cmdDesc[128];</div><div class="line">      <span class="keywordtype">char</span> cmdName[128];</div><div class="line">      pkt-&gt;<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#a8f1536daa451024715fe82cec495e826">bufToStr</a>(cmdDesc, 128); <span class="comment">// description</span></div><div class="line">      pkt-&gt;<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#a8f1536daa451024715fe82cec495e826">bufToStr</a>(cmdName, 128); <span class="comment">// request name</span></div><div class="line">      cmdFreq = pkt-&gt;<a name="a45"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#a80571dd0c49cfb0717b1fc1e81176672">bufToByte4</a>(); <span class="comment">// recommended request frequency</span></div><div class="line">      <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, <span class="stringliteral">&quot;Camera %s has %s command named %s with recommended request frequency %d.&quot;</span>, camName, cmdDesc, cmdName, cmdFreq);</div><div class="line"></div><div class="line">      <span class="keywordflow">if</span>(strcmp(cmdDesc, <span class="stringliteral">&quot;getCameraData&quot;</span>) == 0)</div><div class="line">        dataReqFreq = cmdFreq;</div><div class="line">    }</div><div class="line">    <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArTypes.html#aff7daca3c28eeaacc95b1ac07997661c">ArTypes::Byte2</a> numParams = pkt-&gt;<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#ab300d387c442be9ab025e2c089bbd620">bufToByte2</a>();</div><div class="line">    <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, <span class="stringliteral">&quot;Camera %s has %d parameters.&quot;</span>, camName, numParams);</div><div class="line">    <span class="keywordflow">for</span>(<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArTypes.html#aff7daca3c28eeaacc95b1ac07997661c">ArTypes::Byte2</a> p = 0; p &lt; numParams; ++p)</div><div class="line">    {</div><div class="line">      <a name="_a46"></a><a class="code" href="classArClientArg.html">ArClientArg</a> carg;</div><div class="line">      <a name="_a47"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArConfigArg.html">ArConfigArg</a> arg;</div><div class="line">      <span class="keywordflow">if</span>(!carg.<a name="a48"></a><a class="code" href="classArClientArg.html#a53ca4b30d2afa8b18c38df1e7ada74ba">bufToArgValue</a>(pkt, arg))</div><div class="line">        <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, <span class="stringliteral">&quot;Hmm, error getting ArClientArg for camera %s&#39;s parameter #%d.&quot;</span>, camName, p);</div><div class="line">    }</div><div class="line"></div><div class="line">    cam-&gt;<a class="code" href="classArClientHandlerCamera.html#aad4510c0bbae4ba3b0503cc471b9ef3c">requestUpdates</a>(dataReqFreq);</div><div class="line">    mutex.lock();</div><div class="line">    myCameras.insert(cam);</div><div class="line">    mutex.unlock();</div><div class="line">  }</div><div class="line">}</div><div class="line"></div><div class="line"><span class="keywordtype">void</span> <a class="code" href="classArClientHandlerCamera.html#a2715cf702f761f43cab82581104431be">ArClientHandlerCamera::handleCameraInfoReply</a>(<a class="code" href="classArNetPacket.html">ArNetPacket</a> *pkt)</div><div class="line">{</div><div class="line">  lock();</div><div class="line">  minPan = pkt-&gt;<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#ab300d387c442be9ab025e2c089bbd620">bufToByte2</a>() / 1000.0;</div><div class="line">  maxPan = pkt-&gt;<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#ab300d387c442be9ab025e2c089bbd620">bufToByte2</a>() / 1000.0;</div><div class="line">  minTilt = pkt-&gt;<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#ab300d387c442be9ab025e2c089bbd620">bufToByte2</a>() / 1000.0;</div><div class="line">  maxTilt = pkt-&gt;<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#ab300d387c442be9ab025e2c089bbd620">bufToByte2</a>() / 1000.0;</div><div class="line">  minZoom = pkt-&gt;<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#ab300d387c442be9ab025e2c089bbd620">bufToByte2</a>() / 1000.0;</div><div class="line">  maxZoom = pkt-&gt;<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#ab300d387c442be9ab025e2c089bbd620">bufToByte2</a>() / 1000.0;</div><div class="line">  haveZoom = pkt-&gt;<a name="a49"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#a3006b1fbf239cea0013d0a9e0c0c1baf">bufToByte</a>();</div><div class="line">  <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, <span class="stringliteral">&quot;Got getCameraInfo reply with pan range (%f, %f), tilt range (%f, %f), zoom range (%f, %f), zoom valid %d.&quot;</span>, minPan, maxPan, minTilt, maxTilt, minZoom, maxZoom, haveZoom);</div><div class="line">  unlock();</div><div class="line">}</div><div class="line"></div><div class="line"><span class="keywordtype">void</span> <a class="code" href="classArClientHandlerCamera.html#af2274757258bbbf6ad4ea773acd73751">ArClientHandlerCamera::handleCameraDataReply</a>(<a class="code" href="classArNetPacket.html">ArNetPacket</a> *pkt)</div><div class="line">{</div><div class="line">  lock();</div><div class="line">  pan = pkt-&gt;<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#ab300d387c442be9ab025e2c089bbd620">bufToByte2</a>() / 1000.0;</div><div class="line">  tilt = pkt-&gt;<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#ab300d387c442be9ab025e2c089bbd620">bufToByte2</a>() / 1000.0;</div><div class="line">  zoom = pkt-&gt;<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#ab300d387c442be9ab025e2c089bbd620">bufToByte2</a>() /1000.0;</div><div class="line">  <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, <span class="stringliteral">&quot;Got camera data from camera %s with current pan=%f, tilt=%f, zoom=%f.&quot;</span>, name.c_str(), pan, tilt, zoom);</div><div class="line">  unlock();</div><div class="line">}</div><div class="line"></div><div class="line"><span class="keywordtype">bool</span> <a class="code" href="classArNetCameraRequest.html#a0ce74f31bac004f0414a66a36a4e776b">ArNetCameraRequest::requestPanTiltAbs</a>(<span class="keywordtype">double</span> pan, <span class="keywordtype">double</span> tilt)</div><div class="line">{</div><div class="line">  <a name="a50"></a><a class="code" href="classArNetPacket.html#a967d1901ff4e9cc53e31383eaa3bb609">empty</a>();</div><div class="line">  <a name="a51"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#a4a1712c143161298c10235a7739c73af">byte2ToBuf</a>((<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArTypes.html#aff7daca3c28eeaacc95b1ac07997661c">ArTypes::Byte2</a>)(pan * 1000.0));</div><div class="line">  <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#a4a1712c143161298c10235a7739c73af">byte2ToBuf</a>((<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArTypes.html#aff7daca3c28eeaacc95b1ac07997661c">ArTypes::Byte2</a>)(tilt * 1000.0));</div><div class="line">  <a name="a52"></a><a class="code" href="classArNetPacket.html#a5076d7a8d058ed0f6f5795891e1fca6e">finalizePacket</a>();</div><div class="line">  <span class="keywordflow">return</span> myClient-&gt;requestOnce(myAbsReqName.c_str(), <span class="keyword">this</span>);</div><div class="line">}</div><div class="line"></div><div class="line"><span class="keywordtype">bool</span> <a class="code" href="classArNetCameraRequest.html#a440ce2d91e43102dab8a340be99e87ab">ArNetCameraRequest::requestPanTiltZoomAbs</a>(<span class="keywordtype">double</span> pan, <span class="keywordtype">double</span> tilt, <span class="keywordtype">double</span> zoom)</div><div class="line">{</div><div class="line">  <a class="code" href="classArNetPacket.html#a967d1901ff4e9cc53e31383eaa3bb609">empty</a>();</div><div class="line">  <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#a4a1712c143161298c10235a7739c73af">byte2ToBuf</a>((<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArTypes.html#aff7daca3c28eeaacc95b1ac07997661c">ArTypes::Byte2</a>)(pan * 1000.0));</div><div class="line">  <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#a4a1712c143161298c10235a7739c73af">byte2ToBuf</a>((<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArTypes.html#aff7daca3c28eeaacc95b1ac07997661c">ArTypes::Byte2</a>)(tilt * 1000.0));</div><div class="line">  <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#a4a1712c143161298c10235a7739c73af">byte2ToBuf</a>((<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArTypes.html#aff7daca3c28eeaacc95b1ac07997661c">ArTypes::Byte2</a>)(zoom * 1000.0));</div><div class="line">  <a class="code" href="classArNetPacket.html#a5076d7a8d058ed0f6f5795891e1fca6e">finalizePacket</a>();</div><div class="line">  <span class="keywordflow">return</span> myClient-&gt;requestOnce(myAbsReqName.c_str(), <span class="keyword">this</span>);</div><div class="line">}</div><div class="line"></div><div class="line"></div><div class="line"><span class="keywordtype">void</span> <a class="code" href="classPtzCameraExample.html#abebd051cf8fc085f1d3d7b505e1a8c67">PtzCameraExample::run</a>()</div><div class="line">{</div><div class="line">  <span class="keyword">enum</span> { MinPan, MaxPan, Center1, MinTilt, MaxTilt, Center2} stage;</div><div class="line">  stage = MinPan;</div><div class="line">  <span class="keywordflow">while</span>(myClient-&gt;isConnected()) </div><div class="line">  {</div><div class="line">    mutex.lock();</div><div class="line">    <span class="keywordflow">for</span>(std::set&lt;ArClientHandlerCamera*&gt;::const_iterator i = myCameras.begin(); i != myCameras.end(); ++i)</div><div class="line">    {</div><div class="line">      <a class="code" href="classArClientHandlerCamera.html">ArClientHandlerCamera</a>* c = (*i);</div><div class="line">      c-&gt;<a name="a53"></a><a class="code" href="classArClientHandlerCamera.html#a7d0696f88f3b3c50555d57bc9f296ddc">lock</a>();</div><div class="line">      <span class="keywordflow">switch</span>(stage)</div><div class="line">      {</div><div class="line">        <span class="keywordflow">case</span> MinPan:</div><div class="line">          c-&gt;<a name="a54"></a><a class="code" href="classArClientHandlerCamera.html#acb6d92ea51779c095ad4e26efae4b544">request</a>.<a class="code" href="classArNetCameraRequest.html#a0ce74f31bac004f0414a66a36a4e776b">requestPanTiltAbs</a>(c-&gt;<a name="a55"></a><a class="code" href="classArClientHandlerCamera.html#ad44c8e74a3641f1d8f4945cd8279f9aa">minPan</a>, 0);</div><div class="line">          stage = MaxPan;</div><div class="line">          <span class="keywordflow">break</span>;</div><div class="line">        <span class="keywordflow">case</span> MaxPan:</div><div class="line">          c-&gt;<a class="code" href="classArClientHandlerCamera.html#acb6d92ea51779c095ad4e26efae4b544">request</a>.<a class="code" href="classArNetCameraRequest.html#a0ce74f31bac004f0414a66a36a4e776b">requestPanTiltAbs</a>(c-&gt;<a name="a56"></a><a class="code" href="classArClientHandlerCamera.html#a7b31614a8768ab920299a14944e27d6f">maxPan</a>, 0);</div><div class="line">          stage = Center1;</div><div class="line">          <span class="keywordflow">break</span>;</div><div class="line">        <span class="keywordflow">case</span> Center1:</div><div class="line">          c-&gt;<a class="code" href="classArClientHandlerCamera.html#acb6d92ea51779c095ad4e26efae4b544">request</a>.<a class="code" href="classArNetCameraRequest.html#a0ce74f31bac004f0414a66a36a4e776b">requestPanTiltAbs</a>(0, 0);</div><div class="line">          stage = MinTilt;</div><div class="line">          <span class="keywordflow">break</span>;</div><div class="line">        <span class="keywordflow">case</span> MinTilt:</div><div class="line">          c-&gt;<a class="code" href="classArClientHandlerCamera.html#acb6d92ea51779c095ad4e26efae4b544">request</a>.<a class="code" href="classArNetCameraRequest.html#a0ce74f31bac004f0414a66a36a4e776b">requestPanTiltAbs</a>(0, c-&gt;<a name="a57"></a><a class="code" href="classArClientHandlerCamera.html#a87011dda9ef2399ce4d248df3695d207">minTilt</a>);</div><div class="line">          stage = MaxTilt;</div><div class="line">          <span class="keywordflow">break</span>;</div><div class="line">        <span class="keywordflow">case</span> MaxTilt:</div><div class="line">          c-&gt;<a class="code" href="classArClientHandlerCamera.html#acb6d92ea51779c095ad4e26efae4b544">request</a>.<a class="code" href="classArNetCameraRequest.html#a0ce74f31bac004f0414a66a36a4e776b">requestPanTiltAbs</a>(0, c-&gt;<a name="a58"></a><a class="code" href="classArClientHandlerCamera.html#a3d456a633efbb2976e7496b1851285e0">maxTilt</a>);</div><div class="line">          stage = Center2;</div><div class="line">          <span class="keywordflow">break</span>;</div><div class="line">        <span class="keywordflow">case</span> Center2:</div><div class="line">          c-&gt;<a class="code" href="classArClientHandlerCamera.html#acb6d92ea51779c095ad4e26efae4b544">request</a>.<a class="code" href="classArNetCameraRequest.html#a0ce74f31bac004f0414a66a36a4e776b">requestPanTiltAbs</a>(0, 0);</div><div class="line">          stage = MinPan;</div><div class="line">      }</div><div class="line">      c-&gt;<a name="a59"></a><a class="code" href="classArClientHandlerCamera.html#afa4948c9dc1a426204642777e900f7ee">unlock</a>();</div><div class="line">    }</div><div class="line">    mutex.unlock();</div><div class="line">    <a name="a60"></a><a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/group__easy.html#ga4dfb878a3f9123b8dd96ae05b2fd94cb">ArUtil::sleep</a>(3000);</div><div class="line">  }</div><div class="line">}</div></div><!-- fragment --> </div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
